<!-- Generated automatically from an XML file of the same name.
     Copyright: Stephen J. Sangwine and Nicolas Le Bihan, 2008-2011.
--><html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>real :: Functions (Quaternion Toolbox Function Reference)
</title><link rel="stylesheet" href="qtfmstyle.css" type="text/css"></head><body><h1>Quaternion Function Reference</h1><h2>real</h2>
<p>Real part of a complex quaternion<br>(Quaternion overloading of standard MATLAB&reg; function)
</p>
<h2>Syntax</h2><p><tt>Y = real(X)</tt></p>
<h2>Description</h2>
<p>
<tt>real(X)</tt> returns the real part of a complex quaternion.
</p>
<p>
The concept of the real part of a quaternion should not be confused
with the scalar part (returned by the function <tt>scalar</tt> or
<tt>s</tt>).
</p>

<h2>Examples</h2>
<pre>
&gt;&gt;  q =  complex(quaternion(1,2,3,4), quaternion(5,6,7,8))
 
q = (1+5i) + (2+6i) * I + (3+7i) * J + (4+8i) * K
 
&gt;&gt; imag(q)
 
ans = 5 + 6 * I + 7 * J + 8 * K
 
&gt;&gt; real(q)
 
ans = 1 + 2 * I + 3 * J + 4 * K
</pre>

<h2>See Also</h2>QTFM function: <a href="imag.html">imag</a><br>MATLAB&reg; function: <a href="matlab:doc real">real</a><br>
<h2>References</h2><ol><li>Ward, J. P., "Quaternions and Cayley numbers", Kluwer, 1997.</li></ol>
<h4>&copy; 2008-2011 Stephen J. Sangwine and Nicolas Le Bihan</h4><p><a href="license.html">License terms.</a></p></body></html>